package org.itboys.core.service.mysql.front;

import org.itboys.core.dto.order.SundayRecycleOrderModelDto;
import org.itboys.core.entity.mysql.order.SundayRecycleOrderModel;
import org.itboys.mysql.service.BaseMySqlService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 作者：zzq
 * 时间：2018/12/11
 * 描述：
 */
@Service
public class SundayFrontRecycleOrderModelService extends BaseMySqlService<SundayRecycleOrderModel> {
    /**
     * 组装多个
     *
     * @param models
     * @return
     */
    public List<SundayRecycleOrderModelDto> packageMultiDto(List<SundayRecycleOrderModel> models) {
        List<SundayRecycleOrderModelDto> dtos = new ArrayList<>();
        for (SundayRecycleOrderModel model : models) {
            SundayRecycleOrderModelDto dto = new SundayRecycleOrderModelDto();
            BeanUtils.copyProperties(model, dto);
            dtos.add(dto);
        }
        return dtos;
    }

}
